package com.guoxin.thread.concurrent.chapter8;

/**
 * @author Administrator
 */
public class OtherService {
    private final Object lock = new Object();
    private DeadLock deadLock;

    public void s1() {
        synchronized (lock) {
            System.out.println("s1=========");
        }
    }

    public void s2(){
        synchronized (lock){
            deadLock.m2();
        }
    }

    public void setDeadLock(DeadLock deadLock) {
        this.deadLock = deadLock;
    }
}
